package com.singzi.leetcode.N200;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class T0187 {
}
class Solution0187 {
    private List<String> list = new ArrayList<>();
    public List<String> findRepeatedDnaSequences(String s) {

        HashMap<String, Integer> map = new HashMap<>();
        for(int i = 0;i <= s.length()-10;i++){
            String s1 = s.substring(i, i+10);
            map.put(s1, map.getOrDefault(s1, 0)+1);
            if(map.get(s1) == 2) list.add(s1);
        }
        String s1 = "123";
        s1.intern();
        return list;

    }



}